local qunxian3__baishoukaiduo_juntulilongshengjun = fk.CreateSkill {

  name = "qunxian3__baishoukaiduo_juntulilongshengjun",

  tags = {},

}

Fk:loadTranslationTable {
  ["qunxian3__baishoukaiduo_juntulilongshengjun"] = "军荼利龙盛军",
  [":qunxian3__baishoukaiduo_juntulilongshengjun"] = [[一名角色的回合开始与结束时你可获得两点护甲并恢复一点体力，
  当你造成伤害时你可失去任意点护甲增加等量的伤害。]],
  ["#qunxian3__baishoukaiduo_juntulilongshengjun-choose_num"] = "军荼利龙盛军：你可失去任意点护甲增加等量的伤害。",
  ["$qunxian3__baishoukaiduo_juntulilongshengjun"] = "军荼利龙盛军",
}

qunxian3__baishoukaiduo_juntulilongshengjun:addEffect(fk.TurnStart, {
  anim_type = "support",
  can_trigger = function(self, event, target, player, data)
    return player:hasSkill(qunxian3__baishoukaiduo_juntulilongshengjun.name)
  end,
  on_use = function(self, event, target, player, data)
    local room = player.room
    room:changeShield(player, 2)
    room:changeHp(player, 1, "recover", "qunxian3__baishoukaiduo_juntulilongshengjun")
  end
})

qunxian3__baishoukaiduo_juntulilongshengjun:addEffect(fk.TurnEnd, {
  anim_type = "support",
  can_trigger = function(self, event, target, player, data)
    return player:hasSkill(qunxian3__baishoukaiduo_juntulilongshengjun.name)
  end,
  on_use = function(self, event, target, player, data)
    local room = player.room
    room:changeShield(player, 2)
    room:changeHp(player, 1, "recover", "qunxian3__baishoukaiduo_juntulilongshengjun")
  end
})
qunxian3__baishoukaiduo_juntulilongshengjun:addEffect(fk.DamageCaused, {
  anim_type = "offensive",
  can_trigger = function(self, event, target, player, data)
    return target == player and player:hasSkill(qunxian3__baishoukaiduo_juntulilongshengjun.name)
        and player.shield > 0
  end,
  on_use = function(self, event, target, player, data)
    local room = player.room
    local num = room:askToNumber(player, {
      prompt = '#qunxian3__baishoukaiduo_juntulilongshengjun-choose_num',
      skill_name = "qunxian3__baishoukaiduo_juntulilongshengjun",
      max = player.shield,
      min = 1,
      cancelable = true
    })
    if num then
      room:changeShield(player, -num)
      data:changeDamage(num)
    end
  end
})

return qunxian3__baishoukaiduo_juntulilongshengjun
